Developer Documentation

QuickTime 4 API Documentation

QuickTime Movie File Format Specification, May 1996

| Previous | Chapter contents | Chapter top | Next |

Movie Header Atoms

You use the movie header atom to specify the characteristics of an entire QuickTime movie. The data contained in this atom defines characteristics of the entire QuickTime movie, such as time scale and duration. It has an atom type value of 'mvhd' . Figure 0-7 shows the layout of a movie header atom. The movie header atom is a leaf atom.

Figure 7 The layout of a movie header atom

You define a movie header atom by specifying the following data elements.

Size
A 32-bit integer that specifies the number of bytes in this movie header atom.
Type
A 32-bit integer that identifies the atom type; this field must be set to 'mvhd' .
Version
A 1-byte specification of the version of this movie header atom.
Flags
Three bytes of space for future movie header flags.
Creation time
A 32-bit integer that specifies (in seconds since midnight, January 1, 1904) when the movie atom was created.
Modification time
A 32-bit integer that specifies (in seconds since midnight, January 1, 1904) when the movie atom was changed.
Time scale
A time value that indicates the time scale for this movie--that is, the number of time units that pass per second in its time coordinate system. A time coordinate system that measures time in sixtieths of a second, for example, has a time scale of 60.
Duration
A time value that indicates the duration of the movie in time scale units. Note that this property is derived from the movie's tracks. The value of this field corresponds to the duration of the longest track in the movie.
Preferred rate
A 32-bit fixed-point number that specifies the rate at which to play this movie. A value of 1.0 indicates normal rate.
Preferred volume
A 16-bit fixed-point number that specifies how loud to play this movie's sound. A value of 1.0 indicates full volume.
Reserved
Ten bytes reserved for use by Apple. Set to 0.
Matrix
The matrix structure associated with this movie. A matrix shows how to map points from one coordinate space into another.
Preview time
The time value in the movie at which the preview begins.
Preview duration
The duration of the movie preview in movie time scale units.
Poster time
The time value of the time of the movie poster.
Selection time
The time value for the start time of the current selection.
Selection duration
The duration of the current selection in movie time scale units.
Current time
The time value for current time position within the movie.
Next track ID
A 32-bit integer that indicates a value to use for the track ID number of the next track added to this movie. Note that 0 is not a valid track ID value.

© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Next |